package com.czk.model.observe;

/**
 * @Author:ChenZhangKun
 * @Date: 2020/5/12 20:38
 */
// 天气条件的观察者
public class CurrentCondition implements Observer  {
    private float temperature;
    private float pressure;
    private float humidity;
    public void update(float temperature,float pressure,float humidity){
        this.temperature=temperature;
        this.pressure=pressure;
        this.humidity=humidity;
        display();
    }
    public void display(){
        System.out.println("温度更新了是  "+temperature);
        System.out.println("气压更新了是  "+pressure);
        System.out.println("湿度更新了是  "+humidity);
    }
}
